package com.qdc.datacenters.domain.queue;

import com.qdc.datacenters.domain.entity.ChatContactMsg;
import lombok.Builder;
import lombok.Data;
import org.jetbrains.annotations.NotNull;

import java.util.Date;

/**
 * @author danmo
 * @date 2024-02-28 16:53
 **/
@Builder
@Data
public class ChatMsgQueue implements Comparable<ChatMsgQueue> {

    /**
     * 会话信息
     */
    private ChatContactMsg msg;

    /**
     * 发送时间
     */
    private Date msgTime;


    @Override
    public int compareTo(@NotNull ChatMsgQueue queue) {
        return msgTime.compareTo(this.msgTime);
    }
}
